package cn.rongdao.jrkabao.model.addcard;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.bean.addcard.CardInfo;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jiangyongxing on 2017/6/3.
 * 描述：
 */

public class GetCardInfoForCashModel extends BaseKaMaoModel {

    public static GetCardInfoForCashModel getInstance() {
        return getPresent(GetCardInfoForCashModel.class);
    }

    public void execute(String cardNumner, Observer<CardInfo> observer) {
        addParamStrings("bank_number", FRString.valueOf(cardNumner));
        Observable<CardInfo> observable = mServletApi.getCardInfoForCash(mParams).map(new HttpFunction<CardInfo>());
        toSubscribe(observable, observer);
    }
}